package com.ruoyi.project.ledger.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.ledger.mapper.LedgerSafetyManagementInspectionDailyContentMapper;
import com.ruoyi.project.ledger.domain.LedgerSafetyManagementInspectionDailyContent;
import com.ruoyi.project.ledger.service.ILedgerSafetyManagementInspectionDailyContentService;

/**
 * 日常检查内容Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-06-15
 */
@Service
public class LedgerSafetyManagementInspectionDailyContentServiceImpl implements ILedgerSafetyManagementInspectionDailyContentService 
{
    @Autowired
    private LedgerSafetyManagementInspectionDailyContentMapper ledgerSafetyManagementInspectionDailyContentMapper;

    /**
     * 查询日常检查内容
     * 
     * @param id 日常检查内容ID
     * @return 日常检查内容
     */
    @Override
    public LedgerSafetyManagementInspectionDailyContent selectLedgerSafetyManagementInspectionDailyContentById(Long id)
    {
        return ledgerSafetyManagementInspectionDailyContentMapper.selectLedgerSafetyManagementInspectionDailyContentById(id);
    }

    /**
     * 查询日常检查内容列表
     * 
     * @param ledgerSafetyManagementInspectionDailyContent 日常检查内容
     * @return 日常检查内容
     */
    @Override
    public List<LedgerSafetyManagementInspectionDailyContent> selectLedgerSafetyManagementInspectionDailyContentList(LedgerSafetyManagementInspectionDailyContent ledgerSafetyManagementInspectionDailyContent)
    {
        return ledgerSafetyManagementInspectionDailyContentMapper.selectLedgerSafetyManagementInspectionDailyContentList(ledgerSafetyManagementInspectionDailyContent);
    }

    /**
     * 新增日常检查内容
     * 
     * @param ledgerSafetyManagementInspectionDailyContent 日常检查内容
     * @return 结果
     */
    @Override
    public int insertLedgerSafetyManagementInspectionDailyContent(LedgerSafetyManagementInspectionDailyContent ledgerSafetyManagementInspectionDailyContent)
    {
        ledgerSafetyManagementInspectionDailyContent.setCreateTime(DateUtils.getNowDate());
        return ledgerSafetyManagementInspectionDailyContentMapper.insertLedgerSafetyManagementInspectionDailyContent(ledgerSafetyManagementInspectionDailyContent);
    }

    /**
     * 修改日常检查内容
     * 
     * @param ledgerSafetyManagementInspectionDailyContent 日常检查内容
     * @return 结果
     */
    @Override
    public int updateLedgerSafetyManagementInspectionDailyContent(LedgerSafetyManagementInspectionDailyContent ledgerSafetyManagementInspectionDailyContent)
    {
        ledgerSafetyManagementInspectionDailyContent.setUpdateTime(DateUtils.getNowDate());
        return ledgerSafetyManagementInspectionDailyContentMapper.updateLedgerSafetyManagementInspectionDailyContent(ledgerSafetyManagementInspectionDailyContent);
    }

    /**
     * 批量删除日常检查内容
     * 
     * @param ids 需要删除的日常检查内容ID
     * @return 结果
     */
    @Override
    public int deleteLedgerSafetyManagementInspectionDailyContentByIds(Long[] ids)
    {
        return ledgerSafetyManagementInspectionDailyContentMapper.deleteLedgerSafetyManagementInspectionDailyContentByIds(ids);
    }

    /**
     * 删除日常检查内容信息
     * 
     * @param id 日常检查内容ID
     * @return 结果
     */
    @Override
    public int deleteLedgerSafetyManagementInspectionDailyContentById(Long id)
    {
        return ledgerSafetyManagementInspectionDailyContentMapper.deleteLedgerSafetyManagementInspectionDailyContentById(id);
    }

}
